package cn.ahxb.frame.common.config.network;

import cn.ahxb.frame.work.model.CaptchaBean;
import cn.ahxb.frame.work.model.HttpRespond;
import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * Created by xuyougen on 2018/4/11.
 */

public interface ApiService {
    @GET(ApiFactory.GET_CAPTCHA)
    Observable<HttpRespond<CaptchaBean>> getCaptcha(
            @Query("client") String client,
            @Query("ver") String ver,
            @Query("package") String packageName);

    @GET(ApiFactory.GET_SMS)
    Observable<HttpRespond> getSmsCode(
            @Query("client") String client,
            @Query("ver") String ver,
            @Query("package") String packageName,
            @Query("Mobile") String phoneNum,
            @Query("type") int type,
            @Query("code") String code);

    @POST(ApiFactory.REGISTER)
    Observable<HttpRespond> register(@Body RequestBody requestBody);

    @POST(ApiFactory.SIGN_OUT)
    Observable<HttpRespond> signOut(@Body RequestBody requestBody);

//    ?type=1&page=1
    @GET("satinApi")
    Observable<String> getContent(@Query("type") int type,@Query("page") int page);

}
